package com.jellyleo.activiti.service;

import com.jellyleo.activiti.entity.dto.ProcessDefinitionDTO;
import com.woniu.pojo.PageParam;
import com.woniu.until.ResponseData;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface ProcessDefinitionService {

    ResponseData<?> getProcessDefinitions(PageParam<ProcessDefinitionDTO> pageParam);

    /**
     * 获取流程定义XML
     *
     * @param response
     * @param deploymentId
     * @param resourceName
     */
    public void getProcessDefineXML(HttpServletResponse response, String deploymentId, String resourceName) throws IOException;

    /**
     * 通过stringBPMN添加流程定义
     *
     * @param stringBPMN
     * @return
     */
    public void addDeploymentByString(String stringBPMN);

    /**
     * 上传流程流程定义
     *
     * @param multipartFile
     * @return
     */
    public String upload(MultipartFile multipartFile) throws IOException;

    /**
     * 删除流程定义
     *
     * @param id
     * @return
     */
    public int deleteProcessDefinitionById(String id);


}